/*======================================================
*@author wf_Huang
*@Time 2018/12/17 11:57
*=======================================================
*@function  全局参数
*=====================================================*/

const config = {
  apiSrc:'http://gd.ttt.workeredu.com/', //测试机域名
  user_Data:{
    app_down: "1",
    authCode: "114179auth_91b56a8c9dc7dac0724f46987487efef",
    avatar: "http://gd.ttt.workeredu.com/statics/images/per_img.png",
    bankbranch: "",
    bankcard: "",
    bankcard_img: "",
    bankname: "",
    card: "110101199007070094",
    company: "永辉超市股份有限公司",
    company_address: "",
    company_department_id: "0",
    company_id: "175251",
    company_region: "3111,2058,37728,24208",
    complete_status: 1,
    current_uid: "147263",
    department_name: "",
    email: "",
    idcard_img: "",
    last_login: "1545045367",
    member_type: "0",
    member_type_desc: "工会会员",
    mobile: "18988888877",
    name: "历史测试",
    netin_status: "1",
    netin_time: "1545045319",
    nickname: "",
    opera_status: "0",
    phone: "18988888877",
    pnames: "中国 广东省 广州市 白云区 白云湖街道" ,
    regfrom: "3",
    region_id: "24208",
    regtime: "1545044427",
    sex: "O",
    site_domain: "gz.ttt.workeredu.com",
    site_name: "广州",
    site_parents: [
      {siteid: 29, domain: "gd.ttt.workeredu.com", site_name: "广东职工教育"},
      {siteid: 4968, domain: "fcl.ttt.workeredu.com", site_name: "付晨楼测试开通站"}
    ],
    siteid: 21 ,
    ucenter_mobile: "18988888877",
    ucid: "114179",
    uids: "147263",
    union_id: "102",
    union_member: 0,
    union_name: "白云区总工会",
    union_pids: "",
  }
}

let bindToGlobal = (obj, key) => {
  if (typeof window[key] === 'undefined') {
    window[key] = {};
  }

  for (let i in obj) {
    window[key][i] = obj[i]
  }
}
bindToGlobal(config,'_const') ;
